import Vue from 'vue';
import moment from 'moment';

Vue.filter('dateConversion', function (dateStr, type) {
  try {
    if (!dateStr || new Date(dateStr) === 'Invalid Date') return;
  } catch (e) {}
  return moment(dateStr).format(type || 'yyyy-MM-DD HH:mm:ss');
});
